import request from "@/api/request"; //导入封装请求的js文件

import request1 from "@/api/request1"; //导入封装请求的js文件

//获取头部数据
export function login(data) {
  return request({
    url: "robot/login",
    method: "post",
    data
  });
}


//获取头部数据
export function heartbeat(data,token) {
  return request({
    tokenss: token,
    url: "robot/heartbeat",
    method: "post",
    data
  });
}

////机器人获取并同步彩民微信ID
export function getWechatId(data,token) {
  return request({
    tokenss: token,
    url: "robot/syncUser",
    method: "post",
    data
  });
}

//获取机器人充值地址
export function getRechargeURL(data,token) {
  return request({
    tokenss: token,
    url: "robot/rechargeURL",
    method: "post",
    data
  });
}

// https://simulate.jcinf.com/api/app/lottery/order/get/241129010845994648
////获取投注信息
export function getOrderInfo(id) {
  return request1({
    url: `lottery/order/get/${id}`,
    method: "get"
  });
}


export function permutationPlace(type,issueNo,data,token) {
  return request({
    tokenss: token,
    url: `app/permutation/place/${type}/${issueNo}/2/0`,
    method: "post",
    data
  });
}

/**
 * 竞技彩下单
 * @param {*} data 
 * @param {*} token 
 * @returns 
 */
export function orderCreate(data,token) {
  return request({
    tokenss: token,
    url: `app/racing/order/create`,
    method: "post",
    data
  });
}

//api/app/lottery/order/list
/**
 * 查询投注信息
 * @param {*} data 
 * @param {*} token 
 * @returns 
 */
export function orderList(token,data) {
  return request({
    tokenss: token,
    url: `app/lottery/order/list`,
    method: "post",
    data
  });
}


/**
 * 微信机器人提现接口
 * @param {*} data 
 * @param {*} token 
 * @returns 
 */
export function withdrawal(data,token) {
  return request({
    tokenss: token,
    url: `robot/withdrawal`,
    method: "post",
    data
  });
}

/**
 * 获取机器人下注地址
 * @param {*} data 
 * @param {*} token 
 * @returns 
 */
export function getBetURL(token) {
  return request({
    tokenss: token,
    url: `/robot/betURL`,
    method: "get"
  });
}





